// https://leetcode.cn/problems/palindrome-number/?envType=study-plan-v2&envId=top-interview-150

class Solution {
public:
    bool isPalindrome(int x) {
        string num = to_string(x);
        reverse(num.begin(), num.end());
        int x1 = stol(num);
        return x == x1;
    }
};